home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 October / enter-2005-10.iso / files / jedit42install.exe / {app} / macros / Files / Open_Path.bsh < prev    next >
Encoding:
Text File  |  2004-08-29  |  1.3 KB  |  50 lines

  1. /*
  2.  * Open_Path.bsh - a BeanShell macro script for the
  3.  * jEdit text editor - Prompts for a path name and opens it
  4.  * Copyright (C) 2001 Slava Pestov
  5.  *
  6.  * This program is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU General Public License
  8.  * as published by the Free Software Foundation; either version 2
  9.  * of the License, or any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with the jEdit program; if not, write to the Free Software
  18.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  *
  20.  * $Id: Open_Path.bsh,v 1.2 2001/11/06 17:15:01 jgellene Exp $
  21.  *
  22.  * Checked for jEdit 4.0 API
  23.  *
  24.  */
  25.  
  26. void openPath()
  27. {
  28.     String path = Macros.input(view,"Path name:");
  29.     if(path != null)
  30.         jEdit.openFile(view,path);
  31. }
  32.  
  33. openPath();
  34.  
  35. /*
  36.     Macro index data (in DocBook format)
  37.  
  38. <listitem>
  39.     <para><filename>Open_Path.bsh</filename></para>
  40.     <abstract><para>
  41.         Opens the file supplied by the user in an input dialog.
  42.     </para></abstract>
  43. </listitem>
  44.  
  45. */
  46.  
  47.  
  48. // end Open_Path.bsh
  49.  
  50.